package com.chen.wow.day04.mvc.controller;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import com.chen.wow.day04.mvc.MyTestException;
/**
 *为控制器添加通知
 *@author：email: <a href="cyb@ewppay.com"> Administrator </a> 
 *@Date 2017-4-26 下午4:29:38 
 */

@ControllerAdvice
public class ControllerAdviceHandler {

	@ExceptionHandler(MyTestException.class)
	public String mytestExceptionHandler(){
		System.out.println("为所有controller的MyTestException异常统一做处理");
		return "error";
	}
	
}
